package com.jake.mallcrud.dao;

import com.jake.mallmodel.entity.User;
import com.jake.mallmodel.entity.UserInfo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface UserDao {

    List<User> findAllUsers();

    List<User> findAllUserInfo();

    User findUserById(Integer uid);

    UserInfo findUserInfoById(Integer uid);

    List<UserInfo> findUserInfoByUsernameAndCname(@Param("username") String username, @Param("cname") String cname);

    User findUserByName(@Param("username") String username);

    void insertUser(User user);

    void updateUser(User user);

    void deleteUserById(Integer uid);

}
